<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="theme-color" content="#33474d">
	<title>Apache模块动态加载和静态加载 | 失落的乐章</title>
	<link rel="stylesheet" href="/css/style.css" />
	
      <link rel="alternate" href="/atom.xml" title="失落的乐章" type="application/atom+xml">
    
</head>

<body>

	<header class="header">
		<nav class="header__nav">
			
				<a href="/archives" class="header__link">Archive</a>
			
				<a href="/tags" class="header__link">Tags</a>
			
				<a href="/atom.xml" class="header__link">RSS</a>
			
		</nav>
		<h1 class="header__title"><a href="/">失落的乐章</a></h1>
		<h2 class="header__subtitle">技术面前，永远都是学生。</h2>
	</header>

	<main>
		<article>
	
		<h1>Apache模块动态加载和静态加载</h1>
	
	<div class="article__infos">
		<span class="article__date">2017-10-12</span><br />
		
		
			<span class="article__tags">
			  	<a class="article__tag-link" href="/tags/Apache/">Apache</a> <a class="article__tag-link" href="/tags/LAMP/">LAMP</a>
			</span>
		
	</div>

	

	
		<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;以前对apache研究的不够深刻，甚至连模块的动态以及静态都搞不清楚。查了资料，基本上明了。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;静态，顾名思义就是apache本身不用干什么，不用动就可以使用模块。这就需要把模块都编译进apache的httpd文件中。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;动态，需要apache去调用这个模块，用哪个调用哪个，这种方式的前提是，需要告诉apache这些模块在哪里。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;现在apache版本都普遍都是2.0或者2.2了，针对apache2.x如何动态以及静态编译?</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;对于2.x版本来讲，编译apache的时候，只要加上  –enable-mods-shared=all 就可以动态的编译全部模块。安装完成后会在  apache2/modules 目录下多了很多模块文件。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;如果想静态加载所有模块，编译参数改成  –enable-mods=all</p>

	

	
		<span class="different-posts"><a href="/2017/10/12/Apache/10. Apache模块动态加载和静态加载/" onclick="window.history.go(-1); return false;">⬅️ Go back </a></span>

	

</article>

	</main>

	<footer class="footer">
	<div class="footer-content">
		
	      <div class="footer__element">
	<p>Hi there, <br />welcome to my Blog glad you found it. Have a look around, will you?</p>
</div>

	    
	      <div class="footer__element">
	<h5>Check out</h5>
	<ul class="footer-links">
		<li class="footer-links__link"><a href="/archives">Archive</a></li>
		
		  <li class="footer-links__link"><a href="/atom.xml">RSS</a></li>
	    
		<li class="footer-links__link"><a href="/about">about page</a></li>
		<li class="footer-links__link"><a href="/tags">Tags</a></li>
		<li class="footer-links__link"><a href="/categories">Categories</a></li>
	</ul>
</div>

	    

		<div class="footer-credit">
			<span>© 2017 失落的乐章 | Powered by <a href="https://hexo.io/">Hexo</a> | Theme <a href="https://github.com/HoverBaum/meilidu-hexo">MeiliDu</a></span>
		</div>

	</div>


</footer>



</body>

</html>
